package com.sg.business.commons.labelprovider.work;

import org.eclipse.swt.graphics.Image;

import com.sg.business.model.Document;
import com.sg.widgets.commons.labelprovider.ConfiguratorColumnLabelProvider;

public class WorkReadDocHtmlLabel extends ConfiguratorColumnLabelProvider {

	@Override
	public String getText(Object element) {
		if (element instanceof Document) {
			StringBuffer sb = new StringBuffer();
			sb.append("<div style='cursor:pointer;border-style:none;position:absolute; left:0; top:0; display:block;'> "); //$NON-NLS-1$
			sb.append(((Document) element).getDesc());
			sb.append("</div>");
			return sb.toString();

		}
		return "";
	}

	@Override
	public Image getImage(Object element) {
		if (element instanceof Document) {
			return ((Document) element).getImage();
		}
		return null;
	}

}